GENKEY(1) | Cryptography Utilities | GENKEY(1) |
NAME¶
genkey - generate SSL certificates and certificate requests
SYNOPSIS¶
genkey [--test] [--days count] [[--genreq] | [--makeca] | [--nss] | [--renew] | [--cacert]] {hostname}
DESCRIPTION¶
genkey is an interactive command-line tool which can be used to generate SSL certificates or Certificate Signing Requests (CSR). Generated certificates are stored in the directory /etc/pki/tls/certs/, and the corresponding private key in /etc/pki/tls/private/.
When using mod_nss the private key is stored in the nss database. Consult the nss.conf file in /etc/httpd/conf.d/ for the location of the database.
genkey will prompt for the size of key desired; whether or not to generate a CSR; whether or not an encrypted private key is desired; the certificate subject DN details.
genkey generates random data for the private key using the truerand library and also by prompting the user for entry of random text.
nss indicates that mod_nss database should be used to store keys and certificates.
OPTIONS¶
--makeca
--genreq
--renew
--cacert
--days count
--test
EXAMPLES¶
The following example will create a self-signed certificate and private key for the hostname www.example.com:
# genkey --days 120 www.example.com
The following example will create a self-signed certificate and private key for the hostname www.nssexample.com which will be stored in cert and key in the nss database. If no nickname is given the tool will extract it from mod_nss´s nss configuration file.
# genkey --days --nss 120 www.nssexample.com
The following example will generate a certificate signing request for a new mod_nss style cert specified by its nickname, Server-Cert:
# genkey --genreq --nss --days 120 Server-Cert
The following example will generate a certificate signing request for the renewal of an existing mod_nss cert specified by its nickname, Server-Cert:
# genkey --genreq --renew --nss --days 120 Server-Cert
FILES¶
/etc/pki/tls/openssl.cnf
SEE ALSO¶
10 May 2016 | crypto-utils 2.4.1 |